#include <functional>

#include "Http.hpp"
#include "TcpSever.hpp"

HttpResponse Loign(HttpRequest &request)
{
    request.Print();

    HttpResponse response;
    response.AddVersion(http_version);
    response.AddStateCode(200, "OK");
    return response;
}
int main()
{
    HttpSever http;
    http.InsertConduct("/loign", Loign);
    Sever server(std::bind(&HttpSever::ExecuteHttpSever, &http, std::placeholders::_1), 8889);
    server.Init();
    server.Loop();

    return 0;
}